//Flyweight.cpp
#include "Flyweight.h" 
#include <iostream> 
using namespace std;

Flyweight::Flyweight(string intrinsicState) 
{ 
	this->_intrinsicState = intrinsicState; 
}
Flyweight::~Flyweight() {}
void Flyweight::Operation(const string& extrinsicState) 
{
	cout<<"fds"<<endl;
}

string Flyweight::GetIntrinsicState() 
{ 
	return this->_intrinsicState; 
}

ConcreteFlyweight::ConcreteFlyweight(string intrinsicState):Flyweight(intrinsicState) 
{ 
	cout<<"ConcreteFlyweight Build....."<<intrinsicState<<endl;
}
ConcreteFlyweight::~ConcreteFlyweight() {}

void ConcreteFlyweight::Operation(const string& extrinsicState) 
{ 
	cout<<"ConcreteFlyweight:M "<<this->GetIntrinsicState()<<" V "<<extrinsicState<<" "<<endl; 
}